using System;
using System.Collections.Generic;
using System.Text;

namespace My.IdlConverter.LoadManager
{
    public class DefaultComponentLoader : ComponentLoader
    {
        public DefaultComponentLoader()
        {
        }

        public override IList<UserComponent> Components
        {
            get
            {
                IList<UserComponent> components = new List<UserComponent>();
                UserComponent component = new UserComponent();
                component.CfgFile = "";
                component.Description = "";
                component.FriendlyName = ComponentPath.Substring(ComponentPath.LastIndexOf("\\")+1);
                if (ComponentPath.IndexOf(FileRenamer.FileExtra) != -1)
                    component.LoadBehavior = false;
                else
                    component.LoadBehavior = true;
                component.Path = ComponentPath;
                component.Type = LoadManager.Config.TypeName;

                components.Add(component);

                return components;
            }
        }

        public override void Save(UserComponent addin)
        {
        }
    }
}
